import Vue from 'vue'
import VueRouter from 'vue-router'
import list from '../views/list.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'list',
    component: list
  },
  {
    path: '/item/:id/:min_price',
    name: 'item',
    component: () => import(/* webpackChunkName: "item" */ '../views/item.vue')
  },
  {
    path: '/cart',
    name: 'cart',
    component: () => import(/* webpackChunkName: "cart" */ '../views/cart.vue')
  },
]

const router = new VueRouter({
  routes
})

export default router
